<script lang="ts" setup>
  import { ref } from 'vue';
  import Button from '@sscd/button';
  import Switch from '@sscd/switch';
  const checked = ref<boolean>(true);
  const disabled = ref<boolean>(true);
  const onToggle = () => {
    disabled.value = !disabled.value;
  };
</script>

<template>
  <div class="demo">
    <div class="demo-title">不可用</div>
    <div class="demo-content">
      <Switch v-model:checked="checked" :disabled="disabled" style="margin-bottom: 5px" />
      <br />
      <Button type="primary" @click="onToggle">Toggle disabled</Button>
    </div>
  </div>
</template>
